<template>
    <div class="col">
        <label style="text-align: center;" class="title">{{ props.name }}</label>
        <div class="row_center mt">
            <label>电热偶温度</label>
            <label class="ml" style="min-width: 80px;">{{ props.state.thermocouple_temp }}℃</label>
        </div>
        <div class="row_center mt">
            <label>连接点温度</label>
            <label class="ml" style="min-width: 80px;">{{ props.state.junction_temp }}℃</label>
        </div>

        <div class="row_center mt">
            <el-tooltip
                effect="dark"
                placement="bottom"
                content="红色表示短路到VCC,灰色表示正常">
                <Point name="SCV" :value="props.state.d2"/>
            </el-tooltip>
            <el-tooltip
                effect="dark"
                placement="bottom"
                content="红色表示短路到GND,灰色表示正常">
                <Point class="ml" name="SCG" :value="props.state.d1"/>
            </el-tooltip>
            <el-tooltip
                effect="dark"
                placement="bottom"
                content="红色表示没有连接,灰色表示正常">
                <Point class="ml" name="OC" :value="props.state.d0"/>
            </el-tooltip>
        </div>

    </div>
</template>

<script setup lang="ts">
import { Max311855 } from '../../service/heat_def';
import Point from '../Point.vue';

interface InCtx {
    name: string,
    state: Max311855
}

const props = defineProps<InCtx>();

</script>
